<?php
include("DB_util.php");
/**
 * Created by Shijie Liu. 2017/6/18
 * 用户注册模块
 */

    $id_n = "'".$_GET['id_n']."'";
    $psd_n = "'".$_GET['psd_n']."'";
    $name_n = "'".$_GET['name_n']."'";
    $email_n = "'".$_GET['email_n']."'";
    $address_n = "'".$_GET['address_n']."'";

    $db = new DB_util();

    $sql_add = "INSERT INTO user VALUES ($id_n, $name_n,$psd_n, $address_n,  $email_n);";

    $result = $db->queryDB($sql_add);

    if ($result){
        header("Refresh:1,url=http://mtuchn.cn/wysy/login.php");
        echo '注册成功，1秒后即将自动跳转至登录页面……';
        die;
    }else {
        echo "注册失败!";
    }